package org.linlinjava.litemall.db.service;

import org.linlinjava.litemall.db.dao.AgedmallLeaseRuleConfMapper;
import org.linlinjava.litemall.db.domain.AgedmallLeaseRuleConf;
import org.linlinjava.litemall.db.domain.AgedmallLeaseRuleConfExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AgedmallLeaseRuleConfService {
    @Resource
    private AgedmallLeaseRuleConfMapper agedmallLeaseRuleConfMapper;

    public AgedmallLeaseRuleConf getByStoreIdAndGoodsId(Integer storeId, Integer goodsId) {
        AgedmallLeaseRuleConfExample example = new AgedmallLeaseRuleConfExample();
        example.or().andDeletedEqualTo(false)
                .andGoodsIdEqualTo(goodsId)
                .andStoreIdEqualTo(storeId);
        return agedmallLeaseRuleConfMapper.selectOneByExampleWithBLOBs(example);
    }
}
